<?php

/**
 * User: hda
 * Date: 2017/4/25
 * Time: 9:57
 * Progress: 0%
 */
namespace icontroller\wechat\delivery;
use icontroller\wechat\AController;
use think\Config;
use think\Controller;
use think\Cookie;
use think\Db;

abstract class BController extends AController
{

    function __construct()
    {
        parent::__construct();
        $item=Db::name('account_role')->where(['account_id'=>Cookie::get(Config::get('const.cookie_name_wechat')),'role_id'=>2])->find();
        if(!$item){
            $this->redirect('index/account/reg_delivery');
        }
    }
}